//
//  YHChatMessage.h
//  YHChat
//
//  Created by 银河 on 2019/2/17.
//  Copyright © 2019 yinhe. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

#import <ImSDK/ImSDK.h>

typedef NS_ENUM(NSUInteger, YHChatMessageType) {
    YHChatMessageType_Unknown,
    YHChatMessageType_Text,
    YHChatMessageType_Image,
    YHChatMessageType_Sound,
    YHChatMessageType_Face,
    YHChatMessageType_Custom,
    YHChatMessageType_TimeTip,
    YHChatMessageType_GroupTip,
    YHChatMessageType_SystemTip,
    
    YHChatMessageType_Multi,
};


typedef NS_ENUM(NSUInteger, YHChatMessageStatus) {
    YHChatMessageStatus_Init = -1,
    YHChatMessageStatus_WillSend = 0,
    YHChatMessageStatus_Sending = TIM_MSG_STATUS_SENDING,
    YHChatMessageStatus_SendSucc = TIM_MSG_STATUS_SEND_SUCC,
    YHChatMessageStatus_SendFail = TIM_MSG_STATUS_SEND_FAIL,
};

NS_ASSUME_NONNULL_BEGIN
@class TIMMessage;
@interface YHChatMessage : NSObject

@property (nonatomic, strong, readonly) TIMMessage *sdk_message;
@property (nonatomic, assign) YHChatMessageType messageType;
@property (nonatomic, assign) YHChatMessageStatus messageStatus;


+ (instancetype)msgWith:(TIMMessage *)msg;

+ (instancetype)msgWithText:(NSString *)text;

+ (instancetype)msgWithImageWithPath:(NSString *)path;

+ (instancetype)msgWithDate:(NSDate *)date;

+ (instancetype)msgWithSoundWithPath:(NSString *)path duration:(int)duration;

+ (instancetype)msgWithEmptySound;







- (BOOL)isMineMsg;

- (BOOL)isC2CMsg;

- (BOOL)isGroupMsg;

- (BOOL)isMultiMsg;





@end

NS_ASSUME_NONNULL_END
